***********************************************************************************************************************
*This is the code to replicate the results of the article "Coalition-Directed Economic Voting and the Finance Minister"
*To be run on:
* - replication_data_cses4.dta
* - replication_data_observational.dta
* - replication_data_experimental.dta
*Analyses of the article were executed using Stata/MP 16.0 for Windows (64-bit x86-64)
***********************************************************************************************************************

*set working directory
cd "C:\Users\\`=c(username)'\Dropbox\acad_afalco\papers_duch&falco-gimeno\coalition responsibility\submission_cps\r1\replication\dataverse"


*install required packages
*ssc install combomarginsplot
*ssc install gr0034
*ssc install blindschemes
*ssc install grc1leg




**************************************************************
*FIGURE 1: IDENTIFICATION OF THE FINANCE MINISTER (CSES DATA)*
**************************************************************

*load data
use replication_data_cses4.dta, clear

graph dot (mean) okfin if csample==1, scheme(plottig) over(D1006_NAM, sort(okfin) desc label(labsize(small))) ylabel(.3(.1)1, labsize(small)) yscale(range(.25 1)) ytitle("") exclude0 marker(1, msymbol(O) msize(medium) mcolor(white) mlcolor(black)) linetype(dots) dots(msize(vtiny))



*********************************
*TABLE 1: DESCRIPTIVE STATISTICS*
*********************************

*load data
use replication_data_observational.dta, clear

/*full sample*/
tabstat ev100 cabinet_party coalition seatshare economy_share , s(mean sd med n) c(stat) format(%9.3f)

/*coalition parties*/
tabstat ev100 nopm_nofm nopm_fm pm_nofm pm_fm compartment seatshare economy_share if coalition==1 & cabinet_party==1, s(mean sd med n) c(stat) format(%9.3f)



***************************************************************************************
*TABLE 2: BASELINE MODELS: MARGINAL EFFECTS OF PARTICIPATION IN GOVERNMENT, PM, AND FM*
***************************************************************************************
*load data
use replication_data_observational.dta, clear

estimates clear

/*top panel*/

quietly {

	reg ev100 i.coalition##i.cabinet_party i.coalition##i.pm_sw i.coalition##i.fm_sw i.pm_sw##i.fm_sw seatshare , cluster(data)
	margins , dydx(cabinet_party) at(coalition=(0 1)) post
	est store fulltop1s
	estadd local ss "Yes"
	estadd local es "No"
	estadd local com_tt "No"
	estadd local ce_tt "No"
	estadd local y_fe "No"
	estadd local c_fe "No"
	estadd local n = e(N)


	reg ev100 i.coalition##i.cabinet_party i.coalition##i.pm_sw i.coalition##i.fm_sw i.pm_sw##i.fm_sw seatshare economy_share , cluster(data)
	margins , dydx(cabinet_party) at(coalition=(0 1)) post
	est store fulltop1se
	estadd local ss "Yes"
	estadd local es "Yes"
	estadd local com_tt "No"
	estadd local ce_tt "No"
	estadd local y_fe "No"
	estadd local c_fe "No"
	estadd local n = e(N)


	reg ev100 i.coalition##i.cabinet_party i.coalition##i.pm_sw i.coalition##i.fm_sw i.pm_sw##i.fm_sw seatshare economy_share c.year_x , cluster(data)
	margins , dydx(cabinet_party) at(coalition=(0 1)) post
	est store fulltop2se
	estadd local ss "Yes"
	estadd local es "Yes"
	estadd local com_tt "Yes"
	estadd local ce_tt "No"
	estadd local y_fe "No"
	estadd local c_fe "No"
	estadd local n = e(N)


	reg ev100 i.coalition##i.cabinet_party i.coalition##i.pm_sw i.coalition##i.fm_sw i.pm_sw##i.fm_sw seatshare economy_share i.ccode#c.year_x , cluster(data)
	margins , dydx(cabinet_party) at(coalition=(0 1)) post
	est store fulltop3se
	estadd local ss "Yes"
	estadd local es "Yes"
	estadd local com_tt "No"
	estadd local ce_tt "Yes"
	estadd local y_fe "No"
	estadd local c_fe "No"
	estadd local n = e(N)


	reg ev100 i.coalition##i.cabinet_party i.coalition##i.pm_sw i.coalition##i.fm_sw i.pm_sw##i.fm_sw seatshare economy_share i.year_x i.ccode , cluster(data)
	margins , dydx(cabinet_party) at(coalition=(0 1)) post
	est store fulltop4se
	estadd local ss "Yes"
	estadd local es "Yes"
	estadd local com_tt "No"
	estadd local ce_tt "No"
	estadd local y_fe "Yes"
	estadd local c_fe "Yes"
	estadd local n = e(N)

}

esttab fulltop*, replace noomitted label nonotes noobs nodepvar nomtitles ///
	coeflab(1._at "In a Single-Party Gov." 2._at "In a Coalition Gov.") ///
	interaction(" x ") star(* 0.10 ** 0.05 *** 0.01) ///
	b(%9.2f) se(%9.2f) ///
	scalars("ss Party Size (% of seats)" "es Economic Profile" "com_tt Common Time Trend" "ce_tt Country Time Trend" "y_fe Year FE" "c_fe Country FE" "n N") ///
	addnotes("Standard errors clustered at the survey level in parentheses" "* p<0.10, ** (p<0.05, *** p<0.01.")
 

/*bottom panel*/

quietly {

	reg ev100 i.coalition##i.cabinet_party i.coalition##i.pm_sw i.coalition##i.fm_sw i.pm_sw##i.fm_sw seatshare , cluster(data)
	margins , dydx(pm_sw fm_sw) at(coalition=1 cabinet_party=1) post
	est store fullbot1s
	estadd local ss "Yes"
	estadd local es "No"
	estadd local com_tt "No"
	estadd local ce_tt "No"
	estadd local y_fe "No"
	estadd local c_fe "No"
	estadd local n = e(N)

	reg ev100 i.coalition##i.cabinet_party i.coalition##i.pm_sw i.coalition##i.fm_sw i.pm_sw##i.fm_sw seatshare economy_share , cluster(data)
	margins , dydx(pm_sw fm_sw) at(coalition=1 cabinet_party=1) post
	est store fullbot1se
	estadd local ss "Yes"
	estadd local es "Yes"
	estadd local com_tt "No"
	estadd local ce_tt "No"
	estadd local y_fe "No"
	estadd local c_fe "No"
	estadd local n = e(N)


	reg ev100 i.coalition##i.cabinet_party i.coalition##i.pm_sw i.coalition##i.fm_sw i.pm_sw##i.fm_sw seatshare economy_share c.year_x , cluster(data)
	margins , dydx(pm_sw fm_sw) at(coalition=1 cabinet_party=1) post
	est store fullbot2se
	estadd local ss "Yes"
	estadd local es "Yes"
	estadd local com_tt "Yes"
	estadd local ce_tt "No"
	estadd local y_fe "No"
	estadd local c_fe "No"
	estadd local n = e(N)


	reg ev100 i.coalition##i.cabinet_party i.coalition##i.pm_sw i.coalition##i.fm_sw i.pm_sw##i.fm_sw seatshare economy_share i.ccode#c.year_x , cluster(data)
	margins , dydx(pm_sw fm_sw) at(coalition=1 cabinet_party=1) post
	est store fullbot3se
	estadd local ss "Yes"
	estadd local es "Yes"
	estadd local com_tt "No"
	estadd local ce_tt "Yes"
	estadd local y_fe "No"
	estadd local c_fe "No"
	estadd local n = e(N)


	reg ev100 i.coalition##i.cabinet_party i.coalition##i.pm_sw i.coalition##i.fm_sw i.pm_sw##i.fm_sw seatshare economy_share i.year_x i.ccode , cluster(data)
	margins , dydx(pm_sw fm_sw) at(coalition=1 cabinet_party=1) post
	est store fullbot4se
	estadd local ss "Yes"
	estadd local es "Yes"
	estadd local com_tt "No"
	estadd local ce_tt "No"
	estadd local y_fe "Yes"
	estadd local c_fe "Yes"
	estadd local n = e(N)

}

esttab fullbot*, replace noomitted label nonotes noobs nodepvar nomtitles nobase ///
	coeflab(1.pm_sw "PM in a Coalition Gov." 1.fm_sw "FM in a Coalition Gov.") ///
	interaction(" x ") star(* 0.10 ** 0.05 *** 0.01) ///
	b(%9.2f) se(%9.2f) ///
	scalars("ss Party Size (% of seats)" "es Economic Profile" "com_tt Common Time Trend" "ce_tt Country Time Trend" "y_fe Year FE" "c_fe Country FE" "n N") ///
	addnotes("Standard errors clustered at the survey level in parentheses" "* p<0.10, ** p<0.05, *** p<0.01.")


 
******************************************************************************************************
*FIGURE 2: MARGINAL EFFECTS OF CONTROLLING THE FM AND PM FOR DIFFERENT VALUES OF COMPARTMENTALIZATION*
******************************************************************************************************

*load data
use replication_data_observational.dta, clear

quietly {
/*left panel*/
	reg ev100 i.coalition##i.cabinet_party##i.pm_sw##i.fm_sw##c.compartment seatshare economy_share i.year_x i.ccode , cluster(data)
	margins , dydx(fm_sw) at(coalition=1 cabinet_party==1 compartment=(0(.5)8.5))
	marginsplot, scheme(plottig) nodraw yline(0, lp(dash) lc(plr1)) title("FM effect") xtitle("Level of Compartmentalization", size(small)) ytitle("") xlabel(#10) ylabel(#10) ///
		addplot(histogram compartment if e(sample) & coalition==1, start(-.25) width(.5) yaxis(2) yscale(off axis(2)) legend(off) below fcolor(none) lcolor(gs11)) ///
		saving(g1, replace)

/*right panel*/
	reg ev100 i.coalition##i.cabinet_party##i.pm_sw##i.fm_sw##c.compartment seatshare economy_share i.year_x i.ccode , cluster(data)
	margins , dydx(pm_sw) at(coalition=1 cabinet_party==1 compartment=(0(.5)8.5))
	marginsplot, scheme(plottig) nodraw yline(0, lp(dash) lc(plr1)) title("PM effect") xtitle("Level of Compartmentalization", size(small)) ytitle("") xlabel(#10) ylabel(#10) ///
		addplot(histogram compartment if e(sample) & coalition==1, start(-.25) width(.5) yaxis(2) yscale(off axis(2)) legend(off) below fcolor(none) lcolor(gs11)) ///
		saving(g2, replace)
}

/*combination of the two panels*/
graph combine g1.gph g2.gph , scheme(plottig) xcommon ycommon col(2) imargin(zero)


****************************************************************************************
*FIGURE 3: COMPARISON OR PREDICTIVE MARGINS AT DIFFERENT VALUES OF COMPARTMENTALIZATION*
****************************************************************************************

*load data
use replication_data_observational.dta, clear

quietly {

/*panel "parties in coalitions"*/
	reg ev100 i.coalition##i.cabinet_party i.coalition##i.pm_sw i.coalition##i.fm_sw i.pm_sw##i.fm_sw seatshare economy_share i.year_x i.ccode , cluster(data)
	margins , at(coalition=0 cabinet_party=0) post saving(preda_spop, replace)
	reg ev100 i.coalition##i.cabinet_party i.coalition##i.pm_sw i.coalition##i.fm_sw i.pm_sw##i.fm_sw seatshare economy_share i.year_x i.ccode , cluster(data)
	margins , at(coalition=1 cabinet_party=0) post saving(preda_cop, replace)
	reg ev100 i.coalition##i.cabinet_party i.coalition##i.pm_sw i.coalition##i.fm_sw i.pm_sw##i.fm_sw seatshare economy_share i.year_x i.ccode , cluster(data)
	margins , at(coalition=0 cabinet_party=1) post saving(preda_spin, replace)
	reg ev100 i.coalition##i.cabinet_party i.coalition##i.pm_sw i.coalition##i.fm_sw i.pm_sw##i.fm_sw seatshare economy_share i.year_x i.ccode , cluster(data)
	margins , at(coalition=1 cabinet_party=1) post saving(preda_cin, replace)
	combomarginsplot preda_spop preda_cop preda_spin preda_cin , scheme(plottig) nodraw yline(0, lp(dash) lc(plr1)) recast(scatter) ///
		title("") ///
		xlabel(1 "      Opp-SP" 2 "Opp-Coal" 3 "Gov-SP" 4 "Gov-Coal", angle(vertical) labsize(medium)) xscale(range(0.75 4.24))  ///
		ylabel(-8(1)4, labsize(medium)) ///
		xtitle("General", size(large)) ytitle("") ///
		saving(pred_all, replace)

/*panel "parties in coalitions"*/
	reg ev100 i.coalition##i.cabinet_party i.coalition##i.pm_sw i.coalition##i.fm_sw i.pm_sw##i.fm_sw seatshare economy_share i.year_x i.ccode , cluster(data)
	margins , at(coalition=1 cabinet_party=1 pm_sw=0 fm_sw=0) post saving(predc_npnf, replace)
	reg ev100 i.coalition##i.cabinet_party i.coalition##i.pm_sw i.coalition##i.fm_sw i.pm_sw##i.fm_sw seatshare economy_share i.year_x i.ccode , cluster(data)
	margins , at(coalition=1 cabinet_party=1 pm_sw=0 fm_sw=1) post saving(predc_npyf, replace)
	reg ev100 i.coalition##i.cabinet_party i.coalition##i.pm_sw i.coalition##i.fm_sw i.pm_sw##i.fm_sw seatshare economy_share i.year_x i.ccode , cluster(data)
	margins , at(coalition=1 cabinet_party=1 pm_sw=1 fm_sw=0) post saving(predc_ypnf, replace)
	reg ev100 i.coalition##i.cabinet_party i.coalition##i.pm_sw i.coalition##i.fm_sw i.pm_sw##i.fm_sw seatshare economy_share i.year_x i.ccode , cluster(data)
	margins , at(coalition=1 cabinet_party=1 pm_sw=1 fm_sw=1) post saving(predc_ypyf, replace)
	combomarginsplot predc_npnf predc_npyf predc_ypnf predc_ypyf , scheme(plottig) nodraw yline(0, lp(dash) lc(plr1)) recast(scatter) ///
		title("") ///
		xlabel(1 "noPM-noFM" 2 "noPM-FM" 3 "PM-noFM" 4 "PM-FM", angle(vertical) labsize(medium)) xscale(range(0.75 4.24))  ///
		ylabel(-8(1)4, labsize(medium)) ///
		xtitle("Parties in Coalitions", size(large)) ytitle("") ///
		saving(pred_govcoal, replace)
}

/*combination of the two upper panels*/
graph combine pred_all.gph pred_govcoal.gph , scheme(plottig) xcommon ycommon col(5) imargin(medium) xsize(10)


/*to attribute values of very low, low, median, high, and very high compartmentalization values*/
quietly: sum compartment if n==1 & coalition==1, det
/*very low*/ display `r(p50)'-(2*`r(sd)')
/*low*/ display `r(p50)'-(1*`r(sd)')
/*median*/ display `r(p50)'-(0*`r(sd)')
/*high*/ display `r(p50)'+(1*`r(sd)')
/*very high*/ display `r(p50)'+(2*`r(sd)')

quietly {

	/*panel "very low compartmentalization"*/
	reg ev100 i.coalition##i.cabinet_party##i.pm_sw##i.fm_sw##c.compartment seatshare economy_share i.year_x i.ccode , cluster(data)
	margins , at(coalition=1 cabinet_party=1 compartment=(0.14) pm_sw=0 fm_sw=0) post saving(predvl_npnf, replace)
	reg ev100 i.coalition##i.cabinet_party##i.pm_sw##i.fm_sw##c.compartment seatshare economy_share i.year_x i.ccode , cluster(data)
	margins , at(coalition=1 cabinet_party=1 compartment=(0.14) pm_sw=0 fm_sw=1) post saving(predvl_npyf, replace)
	reg ev100 i.coalition##i.cabinet_party##i.pm_sw##i.fm_sw##c.compartment seatshare economy_share i.year_x i.ccode , cluster(data)
	margins , at(coalition=1 cabinet_party=1 compartment=(0.14) pm_sw=1 fm_sw=0) post saving(predvl_ypnf, replace)
	reg ev100 i.coalition##i.cabinet_party##i.pm_sw##i.fm_sw##c.compartment seatshare economy_share i.year_x i.ccode , cluster(data)
	margins , at(coalition=1 cabinet_party=1 compartment=(0.14) pm_sw=1 fm_sw=1) post saving(predvl_ypyf, replace)
	combomarginsplot predvl_npnf predvl_npyf predvl_ypnf predvl_ypyf , scheme(plottig) nodraw yline(0, lp(dash) lc(plr1)) recast(scatter) ///
		title("") ///
		xlabel(1 "noPM-noFM" 2 "noPM-FM" 3 "PM-noFM" 4 "PM-FM", angle(vertical) labsize(medium)) xscale(range(0.75 4.24)) ///
		ylabel(-9(1)4, labsize(medium)) ///
		xtitle("Very Low Compartment.", size(large)) ytitle("") ///
		saving(predvl, replace)

	/*panel "low compartmentalization"*/
	reg ev100 i.coalition##i.cabinet_party##i.pm_sw##i.fm_sw##c.compartment seatshare economy_share i.year_x i.ccode , cluster(data)
	margins , at(coalition=1 cabinet_party=1 compartment=(1.59) pm_sw=0 fm_sw=0) post saving(predl_npnf, replace)
	reg ev100 i.coalition##i.cabinet_party##i.pm_sw##i.fm_sw##c.compartment seatshare economy_share i.year_x i.ccode , cluster(data)
	margins , at(coalition=1 cabinet_party=1 compartment=(1.59) pm_sw=0 fm_sw=1) post saving(predl_npyf, replace)
	reg ev100 i.coalition##i.cabinet_party##i.pm_sw##i.fm_sw##c.compartment seatshare economy_share i.year_x i.ccode , cluster(data)
	margins , at(coalition=1 cabinet_party=1 compartment=(1.59) pm_sw=1 fm_sw=0) post saving(predl_ypnf, replace)
	reg ev100 i.coalition##i.cabinet_party##i.pm_sw##i.fm_sw##c.compartment seatshare economy_share i.year_x i.ccode , cluster(data)
	margins , at(coalition=1 cabinet_party=1 compartment=(1.59) pm_sw=1 fm_sw=1) post saving(predl_ypyf, replace)
	combomarginsplot predl_npnf predl_npyf predl_ypnf predl_ypyf , scheme(plottig) nodraw yline(0, lp(dash) lc(plr1)) recast(scatter) ///
		title("") ///
		xlabel(1 "noPM-noFM" 2 "noPM-FM" 3 "PM-noFM" 4 "PM-FM", angle(vertical) labsize(medium)) xscale(range(0.75 4.24))  ///
		ylabel(-9(1)4, labsize(medium)) ///
		xtitle("Low Compartment.", size(large)) ytitle("") ///
		saving(predl, replace)

	/*panel "median compartmentalization"*/
	reg ev100 i.coalition##i.cabinet_party##i.pm_sw##i.fm_sw##c.compartment seatshare economy_share i.year_x i.ccode , cluster(data)
	margins , at(coalition=1 cabinet_party=1 compartment=(3.04) pm_sw=0 fm_sw=0) post saving(predm_npnf, replace)
	reg ev100 i.coalition##i.cabinet_party##i.pm_sw##i.fm_sw##c.compartment seatshare economy_share i.year_x i.ccode , cluster(data)
	margins , at(coalition=1 cabinet_party=1 compartment=(3.04) pm_sw=0 fm_sw=1) post saving(predm_npyf, replace)
	reg ev100 i.coalition##i.cabinet_party##i.pm_sw##i.fm_sw##c.compartment seatshare economy_share i.year_x i.ccode , cluster(data)
	margins , at(coalition=1 cabinet_party=1 compartment=(3.04) pm_sw=1 fm_sw=0) post saving(predm_ypnf, replace)
	reg ev100 i.coalition##i.cabinet_party##i.pm_sw##i.fm_sw##c.compartment seatshare economy_share i.year_x i.ccode , cluster(data)
	margins , at(coalition=1 cabinet_party=1 compartment=(3.04) pm_sw=1 fm_sw=1) post saving(predm_ypyf, replace)
	combomarginsplot predm_npnf predm_npyf predm_ypnf predm_ypyf , scheme(plottig) nodraw yline(0, lp(dash) lc(plr1)) recast(scatter) ///
		title("") ///
		xlabel(1 "noPM-noFM" 2 "noPM-FM" 3 "PM-noFM" 4 "PM-FM", angle(vertical) labsize(medium)) xscale(range(0.75 4.24))  ///
		ylabel(-9(1)4, labsize(medium)) ///
		xtitle("Median Compartment.", size(large)) ytitle("") ///
		saving(predm, replace)


	/*panel "high compartmentalization"*/
	reg ev100 i.coalition##i.cabinet_party##i.pm_sw##i.fm_sw##c.compartment seatshare economy_share i.year_x i.ccode , cluster(data)
	margins , at(coalition=1 cabinet_party=1 compartment=(4.49) pm_sw=0 fm_sw=0) post saving(predh_npnf, replace)
	reg ev100 i.coalition##i.cabinet_party##i.pm_sw##i.fm_sw##c.compartment seatshare economy_share i.year_x i.ccode , cluster(data)
	margins , at(coalition=1 cabinet_party=1 compartment=(4.49) pm_sw=0 fm_sw=1) post saving(predh_npyf, replace)
	reg ev100 i.coalition##i.cabinet_party##i.pm_sw##i.fm_sw##c.compartment seatshare economy_share i.year_x i.ccode , cluster(data)
	margins , at(coalition=1 cabinet_party=1 compartment=(4.49) pm_sw=1 fm_sw=0) post saving(predh_ypnf, replace)
	reg ev100 i.coalition##i.cabinet_party##i.pm_sw##i.fm_sw##c.compartment seatshare economy_share i.year_x i.ccode , cluster(data)
	margins , at(coalition=1 cabinet_party=1 compartment=(4.49) pm_sw=1 fm_sw=1) post saving(predh_ypyf, replace)
	combomarginsplot predh_npnf predh_npyf predh_ypnf predh_ypyf , scheme(plottig) nodraw yline(0, lp(dash) lc(plr1)) recast(scatter) ///
		title("") ///
		xlabel(1 "noPM-noFM" 2 "noPM-FM" 3 "PM-noFM" 4 "PM-FM", angle(vertical) labsize(medium)) xscale(range(0.75 4.24))  ///
		ylabel(-9(1)4, labsize(medium)) ///
		xtitle("High Compartment.", size(large)) ytitle("") ///
		saving(predh, replace)


	/*panel "very high compartmentalization"*/
	reg ev100 i.coalition##i.cabinet_party##i.pm_sw##i.fm_sw##c.compartment seatshare economy_share i.year_x i.ccode , cluster(data)
	margins , at(coalition=1 cabinet_party=1 compartment=(5.94) pm_sw=0 fm_sw=0) post saving(predvh_npnf, replace)
	reg ev100 i.coalition##i.cabinet_party##i.pm_sw##i.fm_sw##c.compartment seatshare economy_share i.year_x i.ccode , cluster(data)
	margins , at(coalition=1 cabinet_party=1 compartment=(5.94) pm_sw=0 fm_sw=1) post saving(predvh_npyf, replace)
	reg ev100 i.coalition##i.cabinet_party##i.pm_sw##i.fm_sw##c.compartment seatshare economy_share i.year_x i.ccode , cluster(data)
	margins , at(coalition=1 cabinet_party=1 compartment=(5.94) pm_sw=1 fm_sw=0) post saving(predvh_ypnf, replace)
	reg ev100 i.coalition##i.cabinet_party##i.pm_sw##i.fm_sw##c.compartment seatshare economy_share i.year_x i.ccode , cluster(data)
	margins , at(coalition=1 cabinet_party=1 compartment=(5.94) pm_sw=1 fm_sw=1) post saving(predvh_ypyf, replace)
	combomarginsplot predvh_npnf predvh_npyf predvh_ypnf predvh_ypyf , scheme(plottig) nodraw yline(0, lp(dash) lc(plr1)) recast(scatter) ///
		title("") ///
		xlabel(1 "noPM-noFM" 2 "noPM-FM" 3 "PM-noFM" 4 "PM-FM", angle(vertical) labsize(medium)) xscale(range(0.75 4.24))  ///
		ylabel(-9(1)4, labsize(medium)) ///
		xtitle("Very High Compartment.", size(large)) ytitle("") ///
		saving(predvh, replace)

}

/*combination of the five bottom panels*/
graph combine predvl.gph predl.gph predm.gph predh.gph predvh.gph , scheme(plottig) xcommon ycommon col(5) imargin(zero) xsize(10)



***************************************************************************************
*TABLE 3: MARGINAL EFFECT OF HOLDING THE PM AND FM IN A COALITION*
***************************************************************************************

*load data
use replication_data_observational.dta, clear

estimates clear

quietly {

	reg ev100 i.coalition##i.cabinet_party##i.pm_sw##i.fm_sw##c.compartment seatshare economy_share i.year_x i.ccode , cluster(data)
	margins , dydx(pm_sw fm_sw) at(coalition=1 cabinet_party=1 compartment=(1.59)) post
	est store m1
	estadd local n = e(N)

	reg ev100 i.coalition##i.cabinet_party##i.pm_sw##i.fm_sw##c.compartment seatshare economy_share i.year_x i.ccode , cluster(data)
	margins , dydx(pm_sw fm_sw) at(coalition=1 cabinet_party=1 compartment=(4.49)) post
	est store m2
	estadd local n = e(N)

}

esttab m*, replace noomitted label nonotes noobs nodepvar ///
	keep(1.pm_sw 1.fm_sw) ///
	interaction(" x ") star(* 0.10 ** 0.05 *** 0.01) ///
	b(%9.2f) se(%9.2f) ///
	scalars("n N") ///
	addnotes("Compartmentalization values: low = 1.59 (one SD below the median); high = 4.49 (one SD above the median)" ///
	"Estimates from model 5 in Table 2" ///
	"Standard errors clustered at the survey level in parentheses" ///
	"* p<0.10, ** (p<0.05, *** p<0.01.")


	
*********************************
*FIGURE 4: EXPERIMENTAL EVIDENCE*
*********************************

*load data
use replication_data_experimental.dta, clear


quietly {

	graph hbar pm fp fa if negative==1 & nl==0, scheme(plottig) over(t, sort(order_t) label(tick grid)) ///
		bar(1, color(plb1)) bar(2, color(plg2)) bar(3, color(plr1)) intensity(100) ///
		ylabel(0(25)100, tstyle(major)) ymtick(0(12.5)100, grid tstyle(none)) ///
		title("Ireland", box bcolor(gs13) bexpand) ytitle("") ///
		legend(order(1 "PM" 2 "FM" 3 "FA") row(1) colgap(*.6) keygap(*.6) pos(6) bmargin(30 0 0 2) symxsize(3) symysize(3) title("Party", pos(9) margin(0 2 0 0))) ///
		yscale(lstyle(none) range(0 101)) ///
		saving(hbar_ire_neg, replace)

	graph hbar pm fp fa if negative==1 & nl==1, scheme(plottig) over(t, sort(order_t) label(nolab grid)) ///
		bar(1, color(plb1)) bar(2, color(plg2)) bar(3, color(plr1)) intensity(100) ///
		ylabel(0(25)100, tstyle(major)) ymtick(0(12.5)100, grid tstyle(none)) ///
		title("Netherlands", box bcolor(gs13) bexpand) ytitle("") ///
		legend(order(1 "PM" 2 "FM" 3 "FA") row(1) colgap(*.6) keygap(*.6) pos(6) bmargin(30 0 0 2) symxsize(3) symysize(3) title("Party", pos(9) margin(0 2 0 0))) ///
		yscale(lstyle(none) range(0 101)) ///
		saving(hbar_net_neg, replace) fxsize(55)

}

grc1leg hbar_ire_neg.gph hbar_net_neg.gph, scheme(plottig) xcommon ycommon imargin(tiny) title("{bf:Negative Treatment}", margin(36 0 0 0)) b2title("Rating", size(small) margin(36 0 0 0)) ring(2)



******************************************************
*TABLE 5: EXPERIMENTAL EVIDENCE (NEGATIVE TREATMENTS)*
******************************************************

*load data
use replication_data_experimental.dta, clear

quietly {

	reg fp b7.t i.nl if negative==1 & nl==0
	estimates store ire_neg
	reg fp b7.t i.nl if negative==1 & nl==1
	estimates store nl_neg
	reg fp b7.t i.nl if negative==1
	estimates store pool_neg

}

esttab ire_neg nl_neg pool_neg, replace label nonotes noobs nonumbers noomitted ///
	drop(0.nl) coeflab(1.nl "Fixed Effects (Netherlands)") ///
	se(a2) b(a3) scalars("r2 R-squared" N) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	mgroups("Rating of Finance Minister Party", pattern(1 0 0) span) ///
	mtitles("Ireland" "Netherlands" "Pooled") ///
	addnotes("Standard errors in parentheses" "* p<0.10, ** p<0.05, *** p<0.01.")


***************************************************************************
*TABLE A1 (APPENDIX): UNDERLYING MODELS OF TABLE 2, FIGURE 2, AND FIGURE 3*
***************************************************************************

*load data
use replication_data_observational.dta, clear

estimates clear

quietly {

	reg ev100 i.coalition##i.cabinet_party i.coalition##i.pm_sw i.coalition##i.fm_sw i.pm_sw##i.fm_sw seatshare , cluster(data)
	est store m1s
	estadd local ss "Yes"
	estadd local es "No"
	estadd local com_tt "No"
	estadd local ce_tt "No"
	estadd local y_fe "No"
	estadd local c_fe "No"
	estadd local n = e(N)

	reg ev100 i.coalition##i.cabinet_party i.coalition##i.pm_sw i.coalition##i.fm_sw i.pm_sw##i.fm_sw seatshare economy_share , cluster(data)
	est store m1se
	estadd local ss "Yes"
	estadd local es "Yes"
	estadd local com_tt "No"
	estadd local ce_tt "No"
	estadd local y_fe "No"
	estadd local c_fe "No"
	estadd local n = e(N)

	reg ev100 i.coalition##i.cabinet_party i.coalition##i.pm_sw i.coalition##i.fm_sw i.pm_sw##i.fm_sw seatshare economy_share c.year_x , cluster(data)
	est store m2se
	estadd local ss "Yes"
	estadd local es "Yes"
	estadd local com_tt "Yes"
	estadd local ce_tt "No"
	estadd local y_fe "No"
	estadd local c_fe "No"
	estadd local n = e(N)

	reg ev100 i.coalition##i.cabinet_party i.coalition##i.pm_sw i.coalition##i.fm_sw i.pm_sw##i.fm_sw seatshare economy_share i.ccode#c.year_x , cluster(data)
	est store m3se
	estadd local ss "Yes"
	estadd local es "Yes"
	estadd local com_tt "No"
	estadd local ce_tt "Yes"
	estadd local y_fe "No"
	estadd local c_fe "No"
	estadd local n = e(N)

	reg ev100 i.coalition##i.cabinet_party i.coalition##i.pm_sw i.coalition##i.fm_sw i.pm_sw##i.fm_sw seatshare economy_share i.year_x i.ccode , cluster(data)
	est store m4se
	estadd local ss "Yes"
	estadd local es "Yes"
	estadd local com_tt "No"
	estadd local ce_tt "No"
	estadd local y_fe "Yes"
	estadd local c_fe "Yes"
	estadd local n = e(N)

	reg ev100 i.coalition##i.cabinet_party##i.pm_sw##i.fm_sw##c.compartment seatshare economy_share i.year_x i.ccode , cluster(data)
	est store m5se
	estadd local ss "Yes"
	estadd local es "Yes"
	estadd local com_tt "No"
	estadd local ce_tt "No"
	estadd local y_fe "Yes"
	estadd local c_fe "Yes"
	estadd local n = e(N)

}

esttab m*, replace noomitted label nonotes noobs nodepvar nomtitles ///
 keep(1.coalition 1.cabinet_party 1.pm_sw 1.fm_sw 1.coalition#1.cabinet_party 1.coalition#1.pm_sw 1.coalition#1.fm_sw 1.pm_sw#1.fm_sw compartment 1.cabinet_party#c.compartment 1.pm_sw#c.compartment 1.fm_sw#c.compartment 1.pm_sw#1.fm_sw#c.compartment) ///
 interaction(" x ") star(* 0.10 ** 0.05 *** 0.01) ///
 b(%9.2f) se(%9.2f) ///
 scalars("ss Party Size (% of seats)" "es Economic Profile" "com_tt Common Time Trend" "ce_tt Country Time Trend" "y_fe Year FE" "c_fe Country FE" "n N") ///
 addnotes("Standard errors clustered at the survey level in parentheses" "* p<0.10, ** (p<0.05, *** p<0.01.")



	
*********************************************************************
*TABLE B1 (APPENDIX): RESULTS IN TABLE 2 USING THE RESTRICTED SAMPLE*
*********************************************************************

*load data
use replication_data_observational.dta, clear

quietly {
	*generate effective sample in the most complete model (N=592)*
	reg ev100 i.cabinet_party##i.coalition##i.pm_sw##i.fm_sw##c.compartment seatshare economy_share, cluster(data)
	gen esample=(e(sample))

}


estimates clear

/*top panel*/

quietly {

	reg ev100 i.coalition##i.cabinet_party i.coalition##i.pm_sw i.coalition##i.fm_sw i.pm_sw##i.fm_sw seatshare if esample==1 , cluster(data)
	margins , dydx(cabinet_party) at(coalition=(0 1)) post
	est store restricttop1s
	estadd local ss "Yes"
	estadd local es "No"
	estadd local com_tt "No"
	estadd local ce_tt "No"
	estadd local y_fe "No"
	estadd local c_fe "No"
	estadd local n = e(N)


	reg ev100 i.coalition##i.cabinet_party i.coalition##i.pm_sw i.coalition##i.fm_sw i.pm_sw##i.fm_sw seatshare economy_share if esample==1 , cluster(data)
	margins , dydx(cabinet_party) at(coalition=(0 1)) post
	est store restricttop1se
	estadd local ss "Yes"
	estadd local es "Yes"
	estadd local com_tt "No"
	estadd local ce_tt "No"
	estadd local y_fe "No"
	estadd local c_fe "No"
	estadd local n = e(N)


	reg ev100 i.coalition##i.cabinet_party i.coalition##i.pm_sw i.coalition##i.fm_sw i.pm_sw##i.fm_sw seatshare economy_share c.year_x if esample==1 , cluster(data)
	margins , dydx(cabinet_party) at(coalition=(0 1)) post
	est store restricttop2se
	estadd local ss "Yes"
	estadd local es "Yes"
	estadd local com_tt "Yes"
	estadd local ce_tt "No"
	estadd local y_fe "No"
	estadd local c_fe "No"
	estadd local n = e(N)


	reg ev100 i.coalition##i.cabinet_party i.coalition##i.pm_sw i.coalition##i.fm_sw i.pm_sw##i.fm_sw seatshare economy_share i.ccode#c.year_x if esample==1 , cluster(data)
	margins , dydx(cabinet_party) at(coalition=(0 1)) post
	est store restricttop3se
	estadd local ss "Yes"
	estadd local es "Yes"
	estadd local com_tt "No"
	estadd local ce_tt "Yes"
	estadd local y_fe "No"
	estadd local c_fe "No"
	estadd local n = e(N)


	reg ev100 i.coalition##i.cabinet_party i.coalition##i.pm_sw i.coalition##i.fm_sw i.pm_sw##i.fm_sw seatshare economy_share i.year_x i.ccode if esample==1 , cluster(data)
	margins , dydx(cabinet_party) at(coalition=(0 1)) post
	est store restricttop4se
	estadd local ss "Yes"
	estadd local es "Yes"
	estadd local com_tt "No"
	estadd local ce_tt "No"
	estadd local y_fe "Yes"
	estadd local c_fe "Yes"
	estadd local n = e(N)

}

esttab restricttop*, replace noomitted label nonotes noobs nodepvar nomtitles ///
	coeflab(1._at "In a Single-Party Gov." 2._at "In a Coalition Gov.") ///
	interaction(" x ") star(* 0.10 ** 0.05 *** 0.01) ///
	b(%9.2f) se(%9.2f) ///
	scalars("ss Party Size (% of seats)" "es Economic Profile" "com_tt Common Time Trend" "ce_tt Country Time Trend" "y_fe Year FE" "c_fe Country FE" "n N") ///
	addnotes("Standard errors clustered at the survey level in parentheses" "* p<0.10, ** (p<0.05, *** p<0.01.")
 

/*bottom panel*/

quietly {

	reg ev100 i.coalition##i.cabinet_party i.coalition##i.pm_sw i.coalition##i.fm_sw i.pm_sw##i.fm_sw seatshare if esample==1 , cluster(data)
	margins , dydx(pm_sw fm_sw) at(coalition=1 cabinet_party=1) post
	est store restrictbot1s
	estadd local ss "Yes"
	estadd local es "No"
	estadd local com_tt "No"
	estadd local ce_tt "No"
	estadd local y_fe "No"
	estadd local c_fe "No"
	estadd local n = e(N)

	reg ev100 i.coalition##i.cabinet_party i.coalition##i.pm_sw i.coalition##i.fm_sw i.pm_sw##i.fm_sw seatshare economy_share if esample==1 , cluster(data)
	margins , dydx(pm_sw fm_sw) at(coalition=1 cabinet_party=1) post
	est store restrictbot1se
	estadd local ss "Yes"
	estadd local es "Yes"
	estadd local com_tt "No"
	estadd local ce_tt "No"
	estadd local y_fe "No"
	estadd local c_fe "No"
	estadd local n = e(N)


	reg ev100 i.coalition##i.cabinet_party i.coalition##i.pm_sw i.coalition##i.fm_sw i.pm_sw##i.fm_sw seatshare economy_share c.year_x if esample==1 , cluster(data)
	margins , dydx(pm_sw fm_sw) at(coalition=1 cabinet_party=1) post
	est store restrictbot2se
	estadd local ss "Yes"
	estadd local es "Yes"
	estadd local com_tt "Yes"
	estadd local ce_tt "No"
	estadd local y_fe "No"
	estadd local c_fe "No"
	estadd local n = e(N)


	reg ev100 i.coalition##i.cabinet_party i.coalition##i.pm_sw i.coalition##i.fm_sw i.pm_sw##i.fm_sw seatshare economy_share i.ccode#c.year_x if esample==1 , cluster(data)
	margins , dydx(pm_sw fm_sw) at(coalition=1 cabinet_party=1) post
	est store restrictbot3se
	estadd local ss "Yes"
	estadd local es "Yes"
	estadd local com_tt "No"
	estadd local ce_tt "Yes"
	estadd local y_fe "No"
	estadd local c_fe "No"
	estadd local n = e(N)


	reg ev100 i.coalition##i.cabinet_party i.coalition##i.pm_sw i.coalition##i.fm_sw i.pm_sw##i.fm_sw seatshare economy_share i.year_x i.ccode if esample==1 , cluster(data)
	margins , dydx(pm_sw fm_sw) at(coalition=1 cabinet_party=1) post
	est store restrictbot4se
	estadd local ss "Yes"
	estadd local es "Yes"
	estadd local com_tt "No"
	estadd local ce_tt "No"
	estadd local y_fe "Yes"
	estadd local c_fe "Yes"
	estadd local n = e(N)

}

esttab restrictbot*, replace noomitted label nonotes noobs nodepvar nomtitles nobase ///
	coeflab(1.pm_sw "PM in a Coalition Gov." 1.fm_sw "FM in a Coalition Gov.") ///
	interaction(" x ") star(* 0.10 ** 0.05 *** 0.01) ///
	b(%9.2f) se(%9.2f) ///
	scalars("ss Party Size (% of seats)" "es Economic Profile" "com_tt Common Time Trend" "ce_tt Country Time Trend" "y_fe Year FE" "c_fe Country FE" "n N") ///
	addnotes("Standard errors clustered at the survey level in parentheses" "* p<0.10, ** p<0.05, *** p<0.01.")



*************************************************************************
*FIGURE B1 (APPENDIX): TOP PANEL OF FIGURE 3 USING THE RESTRICTED SAMPLE*
*************************************************************************

*load data
use replication_data_observational.dta, clear

quietly {

/*panel "parties in coalitions"*/
	reg ev100 i.coalition##i.cabinet_party i.coalition##i.pm_sw i.coalition##i.fm_sw i.pm_sw##i.fm_sw seatshare economy_share i.year_x i.ccode if esample==1 , cluster(data)
	margins , at(coalition=0 cabinet_party=0) post saving(restpreda_spop, replace)
	reg ev100 i.coalition##i.cabinet_party i.coalition##i.pm_sw i.coalition##i.fm_sw i.pm_sw##i.fm_sw seatshare economy_share i.year_x i.ccode if esample==1 , cluster(data)
	margins , at(coalition=1 cabinet_party=0) post saving(restpreda_cop, replace)
	reg ev100 i.coalition##i.cabinet_party i.coalition##i.pm_sw i.coalition##i.fm_sw i.pm_sw##i.fm_sw seatshare economy_share i.year_x i.ccode if esample==1 , cluster(data)
	margins , at(coalition=0 cabinet_party=1) post saving(restpreda_spin, replace)
	reg ev100 i.coalition##i.cabinet_party i.coalition##i.pm_sw i.coalition##i.fm_sw i.pm_sw##i.fm_sw seatshare economy_share i.year_x i.ccode if esample==1 , cluster(data)
	margins , at(coalition=1 cabinet_party=1) post saving(restpreda_cin, replace)
	combomarginsplot restpreda_spop restpreda_cop restpreda_spin restpreda_cin , scheme(plottig) nodraw yline(0, lp(dash) lc(plr1)) recast(scatter) ///
		title("") ///
		xlabel(1 "      Opp-SP" 2 "Opp-Coal" 3 "Gov-SP" 4 "Gov-Coal", angle(vertical) labsize(medium)) xscale(range(0.75 4.24))  ///
		ylabel(-8(1)4, labsize(medium)) ///
		xtitle("General", size(large)) ytitle("") ///
		saving(restpred_all, replace)

/*panel "parties in coalitions"*/
	reg ev100 i.coalition##i.cabinet_party i.coalition##i.pm_sw i.coalition##i.fm_sw i.pm_sw##i.fm_sw seatshare economy_share i.year_x i.ccode if esample==1 , cluster(data)
	margins , at(coalition=1 cabinet_party=1 pm_sw=0 fm_sw=0) post saving(restpredc_npnf, replace)
	reg ev100 i.coalition##i.cabinet_party i.coalition##i.pm_sw i.coalition##i.fm_sw i.pm_sw##i.fm_sw seatshare economy_share i.year_x i.ccode if esample==1 , cluster(data)
	margins , at(coalition=1 cabinet_party=1 pm_sw=0 fm_sw=1) post saving(restpredc_npyf, replace)
	reg ev100 i.coalition##i.cabinet_party i.coalition##i.pm_sw i.coalition##i.fm_sw i.pm_sw##i.fm_sw seatshare economy_share i.year_x i.ccode if esample==1 , cluster(data)
	margins , at(coalition=1 cabinet_party=1 pm_sw=1 fm_sw=0) post saving(restpredc_ypnf, replace)
	reg ev100 i.coalition##i.cabinet_party i.coalition##i.pm_sw i.coalition##i.fm_sw i.pm_sw##i.fm_sw seatshare economy_share i.year_x i.ccode if esample==1 , cluster(data)
	margins , at(coalition=1 cabinet_party=1 pm_sw=1 fm_sw=1) post saving(restpredc_ypyf, replace)
	combomarginsplot restpredc_npnf restpredc_npyf restpredc_ypnf restpredc_ypyf , scheme(plottig) nodraw yline(0, lp(dash) lc(plr1)) recast(scatter) ///
		title("") ///
		xlabel(1 "noPM-noFM" 2 "noPM-FM" 3 "PM-noFM" 4 "PM-FM", angle(vertical) labsize(medium)) xscale(range(0.75 4.24))  ///
		ylabel(-8(1)4, labsize(medium)) ///
		xtitle("Parties in Coalitions", size(large)) ytitle("") ///
		saving(restpred_govcoal, replace)
}

/*combination of the two upper panels*/
graph combine restpred_all.gph restpred_govcoal.gph , scheme(plottig) xcommon ycommon col(5) imargin(medium) xsize(10)



**********************************************************************************************
*TABLE C1 (APPENDIX): RESULTS OF THE MAIN BASELINE MODEL (MODEL 5 IN TABLE 2) ADDING CONTROLS*
**********************************************************************************************

*load data
use replication_data_observational.dta, clear

estimates clear

quietly {

	reg ev100 i.coalition##i.cabinet_party##i.pm_sw##i.fm_sw##c.compartment seatshare economy_share i.year_x i.ccode , cluster(data) noempty noomitted
	margins , dydx(pm_sw fm_sw) at(coalition=1 cabinet_party=1 compartment=(1.59 4.49)) noestimcheck post
	est store controls1
	estadd local min "No"
	estadd local imb "No"
	estadd local div "No"
	estadd local eco "No"
	estadd local cbi "No"
	estadd local n = e(N)

	reg ev100 i.coalition##i.cabinet_party##i.pm_sw##i.fm_sw##c.compartment i.minority##i.cabinet_party##i.pm_sw##i.fm_sw seatshare economy_share i.year_x i.ccode, cluster(data) noempty noomitted
	margins , dydx(pm_sw fm_sw) at(coalition=1 cabinet_party=1 compartment=(1.59 4.49)) noestimcheck post
	est store controls2
	estadd local min "Yes"
	estadd local imb "No"
	estadd local div "No"
	estadd local eco "No"
	estadd local cbi "No"
	estadd local n = e(N)

	reg ev100 i.coalition##i.cabinet_party##i.pm_sw##i.fm_sw##c.compartment i.coalition##i.cabinet_party##i.pm_sw##i.fm_sw##c.imbalance seatshare economy_share i.year_x i.ccode , cluster(data) noempty noomitted
	margins , dydx(pm_sw fm_sw) at(coalition=1 cabinet_party=1 compartment=(1.59 4.49)) noestimcheck post
	est store controls3
	estadd local min "No"
	estadd local imb "Yes"
	estadd local div "No"
	estadd local eco "No"
	estadd local cbi "No"
	estadd local n = e(N)

	reg ev100 i.coalition##i.cabinet_party##i.pm_sw##i.fm_sw##c.compartment i.coalition##i.cabinet_party##i.pm_sw##i.fm_sw##c.rilediv seatshare economy_share i.year_x i.ccode , cluster(data) noempty noomitted
	margins , dydx(pm_sw fm_sw) at(coalition=1 cabinet_party=1 compartment=(1.59 4.49)) noestimcheck post
	est store controls4
	estadd local min "No"
	estadd local imb "No"
	estadd local div "Yes"
	estadd local eco "No"
	estadd local cbi "No"
	estadd local n = e(N)

	reg ev100 i.coalition##i.cabinet_party##i.pm_sw##i.fm_sw##c.compartment i.coalition##i.cabinet_party##i.pm_sw##i.fm_sw##i.emdif seatshare economy_share i.year_x i.ccode , cluster(data) noempty noomitted
	margins , dydx(pm_sw fm_sw) at(coalition=1 cabinet_party=1 compartment=(1.59 4.49)) noestimcheck post
	est store controls5
	estadd local min "No"
	estadd local imb "No"
	estadd local div "No"
	estadd local eco "Yes"
	estadd local cbi "No"
	estadd local n = e(N)

	reg ev100 i.coalition##i.cabinet_party##i.pm_sw##i.fm_sw##c.compartment i.coalition##i.cabinet_party##i.pm_sw##i.fm_sw##c.cuk_pol seatshare economy_share i.year_x i.ccode , cluster(data) noempty noomitted
	margins , dydx(pm_sw fm_sw) at(coalition=1 cabinet_party=1 compartment=(1.59 4.49)) noestimcheck post
	est store controls6
	estadd local min "No"
	estadd local imb "No"
	estadd local div "No"
	estadd local eco "No"
	estadd local cbi "Yes"
	estadd local n = e(N)

}


esttab controls*, replace noomitted label nonotes noobs nodepvar nomtitles ///
	coeflab(1._at "Low Compartmentalization" 2._at "High Compartmentalization") ///
	interaction(" x ") star(* 0.10 ** 0.05 *** 0.01) ///
	b(%9.2f) se(%9.2f) ///
	scalars("min Minority Government" "imb Size Imbalance" "div Ideological Divisions" "eco Different Minister of Economy" "cbi Central Bank Independence" "n N") ///
	addnotes("Standard errors clustered at the survey level in parentheses" "* p<0.10, ** (p<0.05, *** p<0.01.")


	
******************************************************************
*FIGURE E1 (APPENDIX): EXPERIMENTAL EVIDENCE (POSITIVE TREATMENT)*
******************************************************************


*load data
use replication_data_experimental.dta, clear


quietly {

	graph hbar pm fp fa if positive==1 & nl==0, scheme(plottig) over(t, sort(order_t) label(tick grid)) ///
		bar(1, color(plb1)) bar(2, color(plg2)) bar(3, color(plr1)) intensity(100) ///
		ylabel(0(25)100, tstyle(major)) ymtick(0(12.5)100, grid tstyle(none)) ///
		title("Ireland", box bcolor(gs13) bexpand) ytitle("") ///
		legend(order(1 "PM" 2 "FM" 3 "FA") row(1) colgap(*.6) keygap(*.6) pos(6) bmargin(30 0 0 2) symxsize(3) symysize(3) title("Party", pos(9) margin(0 2 0 0))) ///
		yscale(lstyle(none) range(0 101)) ///
		saving(hbar_ire_pos, replace)

	graph hbar pm fp fa if positive==1 & nl==1, scheme(plottig) over(t, sort(order_t) label(nolab grid)) ///
		bar(1, color(plb1)) bar(2, color(plg2)) bar(3, color(plr1)) intensity(100) ///
		ylabel(0(25)100, tstyle(major)) ymtick(0(12.5)100, grid tstyle(none)) ///
		title("Netherlands", box bcolor(gs13) bexpand) ytitle("") ///
		legend(order(1 "PM" 2 "FM" 3 "FA") row(1) colgap(*.6) keygap(*.6) pos(6) bmargin(30 0 0 2) symxsize(3) symysize(3) title("Party", pos(9) margin(0 2 0 0))) ///
		yscale(lstyle(none) range(0 101)) ///
		saving(hbar_net_pos, replace) fxsize(55)

}

grc1leg hbar_ire_pos.gph hbar_net_pos.gph, scheme(plottig) xcommon ycommon imargin(tiny) title("{bf:Positive Treatment}", margin(36 0 0 0)) b2title("Rating", size(small) margin(36 0 0 0)) ring(2)



*****************************************************************
*TABLE E1 (APPENDIX): EXPERIMENTAL EVIDENCE (POSITIVE TREATMENT)*
*****************************************************************

*load data
use replication_data_experimental.dta, clear

quietly {

	reg fp b3.t i.nl if positive==1 & nl==0
	estimates store ire_pos
	reg fp b3.t i.nl if positive==1 & nl==1
	estimates store nl_pos
	reg fp b3.t i.nl if positive==1
	estimates store pool_pos

}

esttab ire_pos nl_pos pool_pos, replace label nonotes noobs nonumbers noomitted ///
	drop(0.nl) coeflab(1.nl "Fixed Effects (Netherlands)") ///
	se(a2) b(a3) scalars("r2 R-squared" N) ///
	star(* 0.10 ** 0.05 *** 0.01) ///
	mgroups("Rating of Finance Minister Party", pattern(1 0 0) span) ///
	mtitles("Ireland" "Netherlands" "Pooled") ///
	addnotes("Standard errors in parentheses" "* p<0.10, ** p<0.05, *** p<0.01.")

